import NProgress from 'nprogress';
import { createRouter, createWebHashHistory } from 'vue-router';
import { baseRoutes } from './base';
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    ...baseRoutes,
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/default/signin/SignIn.vue'),
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('../views/default/signup/SignUp.vue'),
    },
  ],
});
router.beforeEach((to, from, next) => {
  NProgress.start();
  next();
});
router.afterEach(() => {
  NProgress.done();
});
export default router;
